package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.SysAppTeacherstudentMapper;
import com.education.wisdom.pojo.SysAppLogin;
import com.education.wisdom.pojo.SysAppTeacherstudent;
import com.education.wisdom.service.ISysAppTeacherstudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 前台教师学生映射 服务层实现
 * 
 * @author ruoyi
 * @date 2019-03-07
 */
@Service
public class SysAppTeacherstudentServiceImpl implements ISysAppTeacherstudentService
{
	@Autowired
	private SysAppTeacherstudentMapper sysAppTeacherstudentMapper;

	/**
     * 查询前台教师学生映射信息
     * 
     * @param id 前台教师学生映射ID
     * @return 前台教师学生映射信息
     */
    @Override
	public SysAppTeacherstudent selectSysAppTeacherstudentById(Integer id)
	{
	    return sysAppTeacherstudentMapper.selectSysAppTeacherstudentById(id);
	}
	
	/**
     * 查询前台教师学生映射列表
     * 
     * @param sysAppTeacherstudent 前台教师学生映射信息
     * @return 前台教师学生映射集合
     */
	@Override
	public List<SysAppTeacherstudent> selectSysAppTeacherstudentList(SysAppTeacherstudent sysAppTeacherstudent)
	{
	    return sysAppTeacherstudentMapper.selectSysAppTeacherstudentList(sysAppTeacherstudent);
	}

	@Override
	public List<SysAppLogin> selectstudentByteacher(SysAppTeacherstudent sysAppTeacherstudent)
	{
	    return sysAppTeacherstudentMapper.selectstudentByteacher(sysAppTeacherstudent);
	}
	
    /**
     * 新增前台教师学生映射
     * 
     * @param sysAppTeacherstudent 前台教师学生映射信息
     * @return 结果
     */
	@Override
	public int insertSysAppTeacherstudent(SysAppTeacherstudent sysAppTeacherstudent)
	{
	    return sysAppTeacherstudentMapper.insertSysAppTeacherstudent(sysAppTeacherstudent);
	}
	
	/**
     * 修改前台教师学生映射
     * 
     * @param sysAppTeacherstudent 前台教师学生映射信息
     * @return 结果
     */
	@Override
	public int updateSysAppTeacherstudent(SysAppTeacherstudent sysAppTeacherstudent)
	{
	    return sysAppTeacherstudentMapper.updateSysAppTeacherstudent(sysAppTeacherstudent);
	}

	/**
     * 删除前台教师学生映射对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteSysAppTeacherstudentByIds(String ids)
	{
		return sysAppTeacherstudentMapper.deleteSysAppTeacherstudentByIds(Convert.toStrArray(ids));
	}
	
}
